<template>
  <div class="box">
    <header>
      <p>校园超市</p>
    </header>
    <main>
      <router-view></router-view>
    </main>
    <footer>
      <van-tabbar route>
        <van-tabbar-item replace to="/home/index" icon="home-o">首页</van-tabbar-item>
        <van-tabbar-item replace to="/home/categary" icon="apps-o">分类</van-tabbar-item>
        <van-tabbar-item replace to="/home/shopcar" icon="shopping-cart-o">购物车</van-tabbar-item>
        <van-tabbar-item replace to="/home/mine" icon="contact">我的</van-tabbar-item>
      </van-tabbar>
    </footer>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue'

export default defineComponent({
  setup() {}
})
</script>

<style lang="less">
* {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
}
html,
body,
#app {
  width: 100%;
  height: 100%;
}
.box {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  header {
    width: 100%;
    height: 50px;
    color: #fff;
    font-size: 18px;
    text-align: center;
    background: orange;
    line-height: 50px;
  }
  main {
    flex: 1;
    overflow: auto;
  }
  footer {
    width: 100%;
    height: 50px;
    background: red;
  }
}
</style>
